#pragma once
#include <string>

class Department; // 前向声明

class Employee {
public:
    explicit Employee(const std::string& name);
    const std::string& getName() const;
    void setDepartment(Department* dept);

private:
    std::string name_;
    Department* department_ = nullptr;

    friend class Department; // 声明Department为友元类[7,8](@ref)
};